<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="${request.contextPath}/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="${request.contextPath}/css/bootstrap-theme.min.css">
    <script type="text/javascript" src="${request.contextPath}/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
    
    <form action="" method="POST" class="form-horizontal" role="form">        
        <input type="hidden" name="channelId" id="channelId"  class="form-control" value="">        
            <div class="form-group">                                
                <label class="col-sm-2 control-label">栏目名称</label>
                <div class="col-sm-4">
                    <input type="text" name="channelName" id="input1/(\w+)/\u\1/g" class="form-control" value="" required="required" pattern="" title="">                    
                </div>
            </div>
            <div class="form-group">                
                <label for="input-id" class="col-sm-2 control-label">栏目介绍</label>
                <div class="col-sm-4">                    
                    
                    <textarea name="channelDescription" id="input1/(\w+)/\u\1/g" class="form-control" rows="3" required="required"></textarea>
                                        
                </div>
            </div>
            <div class="form-group">                
                <label for="input-id" class="col-sm-2 control-label">栏目顺序</label>
                <div class="col-sm-4">                    
                    <input type="number" name="channelNum" id="input1/(\w+)/\u\1/g" class="form-control" value="" min="{5"} max="" step="" required="required" title="">                                                                                
                </div>
            </div>     
            <div class="form-group">
                <div class="col-sm-10 col-sm-offset-2">
                    <button type="submit" class="btn btn-primary">Submit</button>
                </div>
            </div>
    </form>
    <script type="text/javascript">
        $(function(){
            $.post("${request.contextPath}/channel/getById", {channelId: "${channelId}"}, function(data){

            });

            $(":submit").click(function(){                            
                $.post("${request.contextPath}/channel/saveChannel", $("form").serialize(), function(data){
                    alert(data);                    
                });
                return false;
            });

        });
    </script>
</body>
</html>